﻿namespace UnityEditor
{
    using System;
    using UnityEngine;

    internal class VCProjectHooks
    {
        public static void OnProjectWindowItem(string guid, Rect drawRect)
        {
            if (VCProvider.isActive)
            {
                Event current = Event.current;
                if ((current.type == EventType.KeyDown) && (current.keyCode == KeyCode.F5))
                {
                    VCDatabase.Invalidate();
                    current.Use();
                }
                VCOverlay.DrawOverlay(VCDatabase.GetAssetByGUID(guid), drawRect);
            }
        }
    }
}

